package com.mccrea.pattern.visitor;

/**
 * @Classname CEOVisitor
 * @Description CEO访问者
 * @Date 2021/5/20 0020 14:23
 * @Created by Mccrea_Gao
 */
public class CEOVisitor implements Visitor{
    @Override
    public void visit(Engineer engineer) {
        System.out.println("工程师： " + engineer.name + ", KPI: " + engineer.kpi);
    }

    @Override
    public void visit(Manager manager) {
        System.out.println("经理： " + manager.name + ", KPI: " + manager.kpi + ", 新产品数量： " + manager.getProducts());
    }
}
